package com.logic.landseaserver.persistence.read;

import java.util.HashMap;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.logic.common.util.QueryUtil;
import com.logic.landseaserver.domain.Expenses;
import com.logic.landseaserver.models.billcancel.bean.MeterReadResp;
import com.logic.landseaserver.ws.dto.ExpensesDTO;
import com.logic.landseaserver.ws.response.ExpenseTypeResp;

public interface ExpensesReadMapper {
    Expenses selectByPrimaryKey(Integer id);

    List<Expenses> getList(QueryUtil queryUtil);

    ExpensesDTO selectDTOByPrimaryKey(Integer id);

    List<ExpensesDTO> getDTOList(QueryUtil queryUtil);

    //根据房间查询出需要处理的记录
    List<Expenses> queryListByRoomIds(List<Integer> ids);

    Expenses querExpenses(HashMap map);

    Integer getProjectIdByProjectName(String name);

    Date getMaxReadMeterTimeByProjectId(@Param("id")Integer id,  @Param("type")String type);

    Date getMinReadMeterTimeByProjectId(@Param("id")Integer id,  @Param("type")String type);

    Integer queryMaxNo(Integer prjId);


    List<Expenses> backupExpenses();

    Expenses checkExistExpenses(@Param("roomId")Integer roomId,  @Param("type")String type,  @Param("inDate")Date inDate);

    

    /**
     * 
     * [简要描述]：</br>
     * [详细描述]：</br>
     * [作者]：Administrator(2017-09-07)</br>
     *
     * @param code
     * @return
     *
     */
    List<ExpenseTypeResp> selectFee(String code);

    
    MeterReadResp selectCurrentMeterRead(Map<String, Object> pmap);

    MeterReadResp selectLastMeterRead(Map<String, Object> pmap);

    MeterReadResp selectPayBillReadMeter(Map<String, Object> pmap);

    List<Expenses> selectMeterRead(Map<String, Object> pmap);

    Expenses selectExpenseIn(Integer roomId,String type);
}